from alarm import Alarm, AlarmController
import threading
import os
import time

# alarm = Alarm("/home/dt/project/Alarm/alarm.wav")
# AlarmController(alarm)
# thread1 = threading.Thread(target=AlarmController, args=(alarm,))
# thread1.start()

import time
import torch

A = torch.ones(5000, 5000).to('cuda')
B = torch.ones(5000, 5000).to('cuda')
startTime2 = time.time()
for i in range(100):
    C = torch.matmul(A, B)
endTime2 = time.time()
print('gpu计算总时长:', round((endTime2 - startTime2) * 1000, 2), 'ms')



# import pyaudio
#
# def list_audio_devices():
#     p = pyaudio.PyAudio()
#     num_devices = p.get_device_count()
#
#     print("List of available audio output devices:")
#     for i in range(num_devices):
#         device_info = p.get_device_info_by_index(i)
#         if device_info['maxOutputChannels'] > 0:
#             print(f"Device {i}: {device_info['name']}")
#     p.terminate()
#
# if __name__ == "__main__":
#     list_audio_devices()

